<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
  <meta charset="UTF-8">
  <title>用户注册</title>
  <link th:href="@{/css/bootstrap.min.css}" rel="stylesheet">
  <script src="https://code.jquery.com/jquery.js"></script>
  <script th:src="@{/js/bootstrap.js}"></script>
  <style>

    .container1 {
      margin-top: 70px;
      width: 45%;
      margin-left: 30%;
    }

    /* 需要在一行的元素 */
    .inline-style {
      display: inline-block;
    }
    /* 文字需要靠右 */
    .font-position-right{
      text-align: right;
    }
    /* 注册按钮 */
    .register-btn{
      margin-left: 10%;
    }


  </style>
</head>
<body>
<div class="container1">
  <form class="form-horizontal" th:action="@{/user/register}" th:method="post">
    <div class="form-group">
      <!--<h2 class="form-signin-heading">注册</h2>-->
      <!-- class="sr-only"将label标签隐藏 -->
      <label for="username" class="col-sm-2 control-label inline-style font-position-right">用户名</label>
      <div class="col-sm-9 inline-style ">
        <input type="text" class="form-control"  id="username" th:name="username" placeholder="用户名">
      </div>
    </div>
    <div class="form-group">
      <!--<h2 class="form-signin-heading">注册</h2>-->
      <label for="username" class="col-sm-2 control-label  inline-style font-position-right">密码</label>
      <div class="col-sm-9  inline-style">
        <input type="password" class="form-control"  th:name="password" placeholder="密码">
      </div>
    </div>
    <div class="form-group">
      <div class="col-sm-offset-2 col-sm-10">
        <button class="btn btn-lg btn-primary btn-block register-btn" type="submit">注 册</button>
      </div>

    </div>
  </form>

</div>

</body>
</html>